Skip to content

feat(example): validate React Native 0.86#258

Merged
kherembourg merged 7 commits into
feat/sdk-v6-migrationfrom
feat/react-native-0-86
Jul 21, 2026
Merged

feat(example): validate React Native 0.86#258
kherembourg merged 7 commits into
feat/sdk-v6-migrationfrom
feat/react-native-0-86

Conversation

@kherembourg

Copy link
Copy Markdown
Contributor

What changes

  • Makes the RN 0.86 sample consume local v6 packages with New Architecture.
  • Adds fullscreen and embedded paywall coverage plus Android/iOS CI builds.

Why

Officially validates v6 against React Native 0.86.

Risks

No TurboModule/API migration; runtime-only scenarios are documented for manual validation.

How to test

  • Root typecheck and 150 Jest tests
  • Sample lint/typecheck/bundle
  • Android debug and unsigned iOS builds.

@linear-code
linear-code Bot marked this pull request as ready for review July 17, 2026 15:35
@greptile-apps

greptile-apps Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR upgrades the rn-purchasely-test sample to React Native 0.86 with the New Architecture enabled, switches its Purchasely dependencies to local file: paths for v6 validation, and adds two new CI jobs (build-rn-0-86-android and build-rn-0-86-ios) to gate the build on every PR. The App.tsx is rewritten to use the v6 builder API and adds both fullscreen and embedded paywall validation flows.

  • CI breakage: The build-rn-0-86-ios job contains a stray "Build example for iOS" step that references example/ios/example.xcworkspace — a workspace that never has its CocoaPods installed in this job. This will always fail; the step should be removed (the example app build is already covered by the existing build-ios job).
  • New Architecture: Both Android (newArchEnabled=true in gradle.properties) and iOS (RCT_NEW_ARCH_ENABLED=1 in Podfile, RCTNewArchEnabled in Info.plist) are correctly opted in; compileSdk/targetSdk bumped to 36 and Kotlin to 2.3.21 to match.
  • Metro configuration: watchFolders and nodeModulesPaths are added so Metro can resolve the monorepo file: packages during development.

Confidence Score: 3/5

The PR introduces a CI job that will always fail on macOS runners, meaning the new iOS validation gate it adds cannot actually pass until the stray step is removed.

The build-rn-0-86-ios job contains a 'Build example for iOS' step that references a CocoaPods workspace for the example app, but that app's pods are never installed within this job. Every run on a fresh macOS runner will error out at that step. The Android job and all non-iOS changes are correct.

.github/workflows/ci.yml — the trailing step in build-rn-0-86-ios needs to be removed before the job can pass.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Adds two new CI jobs for RN 0.86 validation; the iOS job contains a stray 'Build example for iOS' step that will always fail because no pod install is run for example/ios in that job.
test-projects/rn-purchasely-test/App.tsx Migrates the demo app to the v6 builder API, adds fullscreen and embedded paywall validation modes; PLYPresentationView is missing flex={1} so the embedded view may render with zero height.
test-projects/rn-purchasely-test/package.json Switches Purchasely dependencies to local file: paths for v6 validation, upgrades to RN 0.86 toolchain, and corrects the brace-expansion override to a resolvable v5.x range.
test-projects/rn-purchasely-test/metro.config.js Adds watchFolders and nodeModulesPaths to let Metro resolve the monorepo local packages referenced via file: dependencies.
test-projects/rn-purchasely-test/android/gradle.properties Enables New Architecture (newArchEnabled=true) for the Android test project.
test-projects/rn-purchasely-test/ios/Podfile Enables RCT_NEW_ARCH_ENABLED=1 at the Podfile level to activate the New Architecture interop path for iOS.
test-projects/rn-purchasely-test/android/build.gradle Bumps compileSdk/targetSdk to 36, Kotlin to 2.3.21, and pins the Kotlin Gradle plugin version explicitly.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    PR[Pull Request / workflow_dispatch] --> Lint[lint job]
    PR --> Test[test job]
    PR --> BuildAndroid[build-android\nexample app]
    PR --> BuildIOS[build-ios\nexample app]
    PR --> RN86Android[build-rn-0-86-android\nRN 0.86 test project]
    PR --> RN86IOS[build-rn-0-86-ios\nRN 0.86 test project]

    BuildAndroid --> GradleCache[Gradle cache\nsetup-gradle + build-cache]
    BuildAndroid --> AssembleDebug[assembleDebug]

    BuildIOS --> CocoaCache[CocoaPods + DerivedData cache]
    BuildIOS --> PodInstallExample[pod install - example/ios]
    PodInstallExample --> XcodeBuildExample[xcodebuild Pods-example]

    RN86Android --> YarnPrepare1[yarn all:prepare]
    YarnPrepare1 --> NpmCI1[npm ci --ignore-scripts]
    NpmCI1 --> Gradle86[assembleDebug\nno Gradle cache ⚠️]

    RN86IOS --> YarnPrepare2[yarn all:prepare]
    YarnPrepare2 --> NpmCI2[npm ci --ignore-scripts]
    NpmCI2 --> PodInstallTest[pod install - rn-purchasely-test/ios]
    PodInstallTest --> XcodeBuild86[xcodebuild RNPurchaselyTest]
    XcodeBuild86 --> BrokenStep[Build example for iOS ❌\nno pod install for example/ios]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    PR[Pull Request / workflow_dispatch] --> Lint[lint job]
    PR --> Test[test job]
    PR --> BuildAndroid[build-android\nexample app]
    PR --> BuildIOS[build-ios\nexample app]
    PR --> RN86Android[build-rn-0-86-android\nRN 0.86 test project]
    PR --> RN86IOS[build-rn-0-86-ios\nRN 0.86 test project]

    BuildAndroid --> GradleCache[Gradle cache\nsetup-gradle + build-cache]
    BuildAndroid --> AssembleDebug[assembleDebug]

    BuildIOS --> CocoaCache[CocoaPods + DerivedData cache]
    BuildIOS --> PodInstallExample[pod install - example/ios]
    PodInstallExample --> XcodeBuildExample[xcodebuild Pods-example]

    RN86Android --> YarnPrepare1[yarn all:prepare]
    YarnPrepare1 --> NpmCI1[npm ci --ignore-scripts]
    NpmCI1 --> Gradle86[assembleDebug\nno Gradle cache ⚠️]

    RN86IOS --> YarnPrepare2[yarn all:prepare]
    YarnPrepare2 --> NpmCI2[npm ci --ignore-scripts]
    NpmCI2 --> PodInstallTest[pod install - rn-purchasely-test/ios]
    PodInstallTest --> XcodeBuild86[xcodebuild RNPurchaselyTest]
    XcodeBuild86 --> BrokenStep[Build example for iOS ❌\nno pod install for example/ios]
Loading

Comments Outside Diff (1)

  1. .github/workflows/ci.yml, line 209-218 (link)

    P1 "Build example for iOS" step will always fail in this job

    The build-rn-0-86-ios job only runs pod install for test-projects/rn-purchasely-test/ios (line 194–195), but this trailing step tries to build example/ios/example.xcworkspace — which has no Pods installed anywhere in this job. Xcode will error out because the workspace file won't exist or its resolved pods will be missing. The step should either be removed from this job (the example app is already covered by the existing build-ios job) or a dedicated pod install for example/ios must be added before it.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: .github/workflows/ci.yml
    Line: 209-218
    
    Comment:
    **"Build example for iOS" step will always fail in this job**
    
    The `build-rn-0-86-ios` job only runs `pod install` for `test-projects/rn-purchasely-test/ios` (line 194–195), but this trailing step tries to build `example/ios/example.xcworkspace` — which has no Pods installed anywhere in this job. Xcode will error out because the workspace file won't exist or its resolved pods will be missing. The step should either be removed from this job (the example app is already covered by the existing `build-ios` job) or a dedicated `pod install` for `example/ios` must be added before it.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Claude Code Fix in Cursor Fix in Codex

Fix All in Claude Code Fix All in Cursor Fix All in Codex

Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 3
.github/workflows/ci.yml:209-218
**"Build example for iOS" step will always fail in this job**

The `build-rn-0-86-ios` job only runs `pod install` for `test-projects/rn-purchasely-test/ios` (line 194–195), but this trailing step tries to build `example/ios/example.xcworkspace` — which has no Pods installed anywhere in this job. Xcode will error out because the workspace file won't exist or its resolved pods will be missing. The step should either be removed from this job (the example app is already covered by the existing `build-ios` job) or a dedicated `pod install` for `example/ios` must be added before it.

```suggestion

```

### Issue 2 of 3
.github/workflows/ci.yml:142-175
**No Gradle caching in `build-rn-0-86-android`**

The existing `build-android` job uses both `gradle/actions/setup-gradle@v5` (with built-in Gradle cache) and an explicit `actions/cache@v4` for `~/.android/build-cache`. The new `build-rn-0-86-android` job has neither, so it will re-download and recompile Gradle wrapper and all Android dependencies from scratch on every run, significantly increasing CI time.

### Issue 3 of 3
test-projects/rn-purchasely-test/App.tsx:285-288
Add `flex={1}` so the native view fills the 420 pt container; without it the paywall may render as an invisible zero-height region.

```suggestion
                            <View style={styles.embeddedPaywall}>
                                <PLYPresentationView
                                    placementId="ONBOARDING"
                                    flex={1}
                                    onPresentationClosed={(result) => {
```

Reviews (1): Last reviewed commit: "ci: allow manual React Native validation" | Re-trigger Greptile

Comment thread .github/workflows/ci.yml Outdated
Comment thread test-projects/rn-purchasely-test/App.tsx
- Restore the 'Build example for iOS' step to build-ios (it had been moved
  into build-rn-0-86-ios, where no pod install runs for example/ios so it
  always failed, and build-ios silently lost its example build coverage).
- Add Gradle caching (setup-gradle@v5 + build-cache + GRADLE_FLAGS) to
  build-rn-0-86-android, mirroring build-android.
- Fix indentation of the trailing xcodebuild continuation in build-ios.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kherembourg

Copy link
Copy Markdown
Contributor Author

All review findings addressed in 9755b46:

Finding Resolution
CI breakage — stray Build example for iOS step in build-rn-0-86-ios (no pod install → always fails) Fixed — step restored to build-ios (which had silently lost its example build coverage) and removed from build-rn-0-86-ios.
No Gradle caching in build-rn-0-86-android Fixed — added setup-gradle@v5 + ~/.android/build-cache cache + GRADLE_FLAGS, mirroring build-android.
PLYPresentationView missing flex={1} in App.tsx False positive — the component defaults flex = 1 and sits in a fixed height: 420 container; no change.

@kherembourg
kherembourg merged commit 64d6a5d into feat/sdk-v6-migration Jul 21, 2026
@kherembourg
kherembourg deleted the feat/react-native-0-86 branch July 21, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants